package com.fishery.customization.service.impl;

import com.fishery.customization.dao.DraggableModuleCheckedDao;
import com.fishery.customization.entity.vo.UpdateDraggableModuleCheckedVo;
import com.fishery.customization.service.DraggableModuleCheckedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DraggableModuleCheckedServiceImpl implements DraggableModuleCheckedService {

	@Autowired
	private DraggableModuleCheckedDao draggableModuleCheckedDao;

	@Override
	public List<String> getDraggableModuleCheckedByUserId(String userId) {
		return draggableModuleCheckedDao.findDraggableModuleCheckedByUserId(userId);
	}

	@Override
	public boolean saveOrUpdateDraggableModuleCheckedByUserId(UpdateDraggableModuleCheckedVo draggableModuleCheckedVo) {
		return draggableModuleCheckedDao.upsertDraggableModuleCheckedByUserId(draggableModuleCheckedVo) > 0;
	}
}
